<!--
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-02-03 14:30:56
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-02-03 17:01:17
 * @FilePath: \tv\src\views\main\ceshi.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h3>{{ msg }}</h3>
        {{1>2?true:false}}
        <button @click="clicking()"></button>
        <input @keydown="anxia"/>
        <input @keyup="song"/>
        <p v-if="a">333</p> <p v-if="b">444</p><p v-else>555</p>
      <p>{{newxx}}</p>
        <input :value="xx"/>
        <input v-model="xx"/>
        <p>Original message: "{{ message }}"</p>
        <p>Computed reversed message: "{{ reversedMessage }}"</p>
      <!-- <ul>
        <li v-for="(xjj,index) in list" :index="index">
            {{xjj.name}}
        </li>
      </ul> -->
      <ul>
        <li v-for="(xjj1,index1) in entrys" :index="index1">
            {{xjj1.title}}
        </li>
      </ul>
        </div>
        <!-- 1.引包 -->
        <script type="text/javascript"
        src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
        <!-- <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.common.dev.js">
        </script> -->
        <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.js">
        </script>
       <script type="text/javascript">
        // MVVM Model View ViewModel
        //2.创建实例化vue对象
     var app= 
       new Vue({
        el: '#app', //目的地
        template: ``,
        data: function() {
        // 声明的数据
        return {
        msg: '大家学习vue3',a:true,b:false,xx:'双向绑定',
        list:[{name:'1'},{name:'2'},{name:'3'}],newxx:'', message: 'Hello',
        entrys:[]
        }
        },methods:{//http://localhost:8081/findEntryAll
            clicking(){
                alert('谁点我');
            }, anxia(){
                alert('按下了');
            }, song(){
                alert('送了');
            }
        },created:function(){
            alert('开始了');
        },created:function(){//mounted
        // var apps= 
         axios.get('http://localhost:8081/findEntryAll')
          .then(function(res){
                app.entrys=res.data;
                console.log(app.entrys);
                console.log(app.entrys[0].title);
          }).catch(function (reason) {
            console.log(reason)
            });
         },
       // watch:{
        //     xx(newval,oldval){
        //         alert("新的"+newval);
        //     }
        // },
        computed: {
    // 计算属性的 getter
    reversedMessage: function () {
      // `this` 指向 vm 实例
    //   return this.message.split('').reverse().join('')
    return this.message+"xinde";
    }
  }

        })
        </script>
</body>
</html>